names = open("E:\\python_learning\\note\\names.txt")


def is_ascending(name):
    temp = name[0]
    for n in name:
        if n < temp:
            return False
        temp = n
    return True


for c in names:
    c = c.strip().lower();
    if is_ascending(c):
        print(c)

names.close()
